package com.swt.gap.dao;

import com.swt.gap.model.entity.OntologyNode;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OntologyNodeDao {
    int deleteByPrimaryKey(Integer entityId);

    int insertSelective(OntologyNode record);

    OntologyNode selectByPrimaryKey(Integer entityId);

    int updateByPrimaryKeySelective(OntologyNode record);

    List<OntologyNode> selectByOntologyId(Integer ontologyId);

    List<OntologyNode> selectAll();

    List<OntologyNode> selectFirstLevel();

    List<OntologyNode> selectChildrenNodes(Integer nodeId);

    OntologyNode selectByName(@Param("type")Integer type, @Param("labels")String labels);

    int updateEntityByDelete(Integer entityId);

    List<OntologyNode> selectByType(Integer type);

    List<OntologyNode> selectByIconId(Integer iconId);

    List<OntologyNode> selectByLabels(String labels);

    List<OntologyNode> selectByLabelsWithDeleted(String labels);

    OntologyNode selectByEnglishName(String englishName);
}